home *** CD-ROM | disk | FTP | other *** search
/ PC Gamer (Italian) 29 / PC Gamer IT CD 29 1-2.iso / MEDIA / UPDATE.DXR / Internal_1.ls < prev    next >
Encoding:
Text File  |  1997-12-01  |  3.8 KB  |  149 lines

  1. on startMovie
  2.   global DBfact, TBfact
  3.   clearGlobals()
  4.   if the machineType = 256 then
  5.     if the platform = "Windows,32" then
  6.       openXLib(the pathName & "XTRAS32\V12Dbe")
  7.       openXLib(the pathName & "XTRAS32\V12Table")
  8.       openXLib(the pathName & "XTRAS32\Fileio")
  9.       openXLib(the pathName & "XTRAS32\FileXtra")
  10.     else
  11.       openXLib(the pathName & "XTRAS16\V12Dbe")
  12.       openXLib(the pathName & "XTRAS16\V12Table")
  13.       openXLib(the pathName & "XTRAS16\Fileio")
  14.       openXLib(the pathName & "XTRAS16\FileXtra")
  15.     end if
  16.   else
  17.     openXLib(the pathName & "xtras:V12Dbe")
  18.     openXLib(the pathName & "xtras:V12Table")
  19.     openXLib(the pathName & "xtras:FileIOXtraFat")
  20.   end if
  21.   set DBfact to xtra("V12Dbe")
  22.   set TBfact to xtra("V12Table")
  23.   set the visible of sprite 11 to 0
  24.   set the visible of sprite 12 to 0
  25.   set the visible of sprite 13 to 0
  26.   set the visible of sprite 14 to 0
  27.   set the visible of sprite 15 to 0
  28.   set the visible of sprite 16 to 0
  29.   set the visible of sprite 18 to 0
  30.   set the visible of sprite 19 to 0
  31.   set the visible of sprite 20 to 0
  32.   set the visible of sprite 21 to 0
  33.   set the visible of sprite 22 to 0
  34.   set the visible of sprite 23 to 0
  35.   set the visible of sprite 24 to 0
  36.   getPrefThingy()
  37.   loadBrowser()
  38. end
  39.  
  40. on keyDown
  41.   if the key = "" then
  42.     nothing()
  43.     dontPassEvent()
  44.   end if
  45. end
  46.  
  47. on stopMovie
  48.   global gTB, gDb
  49.   set gTB to 0
  50.   set gDb to 0
  51. end
  52.  
  53. on showInstall
  54.   set spriteNum to castspritea("Install")
  55.   puppetSound(2, 0)
  56.   puppetSound(2, "blooip")
  57.   puppetSprite(spriteNum, 1)
  58.   repeat with index = -8 to 8
  59.     set pos to index * 40
  60.     set the locH of sprite spriteNum to pos
  61.     updateStage()
  62.   end repeat
  63. end
  64.  
  65. on hideInstall
  66.   set spriteNum to castspritea("Install")
  67.   if the locH of sprite spriteNum <> 320 then
  68.     exit
  69.   end if
  70.   puppetSound(2, 0)
  71.   puppetSound(2, "pioolb")
  72.   puppetSprite(spriteNum, 1)
  73.   repeat with index = 8 down to -8
  74.     set pos to index * 40
  75.     set the locH of sprite spriteNum to pos
  76.     updateStage()
  77.   end repeat
  78. end
  79.  
  80. on doPopMenu spriteNum, h, v
  81.   set the visible of sprite spriteNum to 1
  82.   set the locH of sprite spriteNum to h
  83.   set the locV of sprite spriteNum to v
  84.   updateStage()
  85.   set cNum to the castNum of sprite spriteNum
  86.   set lastSelection to 0
  87.   set len to the number of lines in field cNum
  88.   repeat while the stillDown
  89.     set mc to the mouseLine
  90.     if (0 < mc) and (mc <= len) and rollOver(spriteNum) then
  91.       if mc <> lastSelection then
  92.         set lastSelection to mc
  93.         hilite line mc of field cNum
  94.         updateStage()
  95.       end if
  96.       next repeat
  97.     end if
  98.     if mc <> lastSelection then
  99.       set lastSelection to -1
  100.       hilite line len + 1 of field cNum
  101.       updateStage()
  102.     end if
  103.   end repeat
  104.   set the visible of sprite spriteNum to 0
  105.   set the visible of sprite 47 to 0
  106.   updateStage()
  107.   if line lastSelection of field cNum <> EMPTY then
  108.     return lastSelection
  109.   else
  110.     return -1
  111.   end if
  112. end
  113.  
  114. on TrackClick
  115.   set spriteNum to the clickOn
  116.   set offCast to the castNum of sprite spriteNum
  117.   set onCast to offCast + 1
  118.   set the castNum of sprite spriteNum to onCast
  119.   updateStage()
  120.   repeat while the mouseDown
  121.     if rollOver(spriteNum) then
  122.       set the castNum of sprite spriteNum to onCast
  123.     else
  124.       set the castNum of sprite spriteNum to offCast
  125.     end if
  126.     updateStage()
  127.   end repeat
  128.   set the castNum of sprite spriteNum to offCast
  129.   updateStage()
  130.   return rollOver(spriteNum)
  131. end
  132.  
  133. on loadBrowser
  134.   global myFile
  135.   set gOSDir to getOSDirectory()
  136.   put gOSDir & "\" into field "OSPath"
  137.   put gOSDir & "\BROWSER.TXT" into field "ThePath"
  138.   set DaPath to field "ThePath"
  139.   if objectp(myFile) then
  140.     set myFile to 0
  141.   end if
  142.   set myFile to new(xtra("fileio"))
  143.   openFile(myFile, DaPath, 1)
  144.   set TheWeb to readLine(myFile)
  145.   put TheWeb into field "browserSelect"
  146.   closeFile(myFile)
  147.   set myFile to 0
  148. end
  149.